 	
<div class="column full fl">
		
			<div class="box themed_box">

	<h2 class="box-header"><?php echo $title; ?></h2>
	<div class="box-content box-table">
       <br />
       <form id="formtest" name="formtest" method="post" action="<?php //echo site_url($form['action']); ?>">
            <label><?php echo $this->lang->line('cust_name'); ?></label>
            <input type="text" name="keywords" class="width15">
			
			
			<label><?php echo $this->lang->line('pic'); ?></label>
            <select  class="form-field width10" id="select" name="pic_search" title="Select a category">
                   <option value="">All</option>  
    				<?php foreach($table['users_inhouse'] as $rowuser): ?>
                    <option value="<?php echo $rowuser['username']; ?>"><?php echo $rowuser['username']; ?></option>
                <?php endforeach;?>
            </select>
            
            <label><?php echo $this->lang->line('group'); ?></label>
            <select  class="form-field width10" id="select" name="group_search" title="Select a category">
                    <option value="">All</option>  
    				<?php foreach($table['groups'] as $rowgroup): ?>
                    <option value="<?php echo $rowgroup['id']; ?>"><?php echo $rowgroup['group_name']; ?></option>
                <?php endforeach;?>
            </select>
            
            <label><?php echo $this->lang->line('sector'); ?></label>
            <select  class="form-field width10" id="select" name="sector_search" title="Select a category">
                    <option value="">All</option>  
    				<?php foreach($table['sectors'] as $rowsector): ?>
                    <option value="<?php echo $rowsector['id']; ?>"><?php echo $rowsector['sector_name']; ?></option>
                <?php endforeach;?>
            </select>
            
            <label><?php echo $this->lang->line('source'); ?></label>
            <select  class="form-field width10" id="select" name="source_search" title="Select a category">
                    <option value="">All</option>  
    				<?php foreach($table['sources'] as $rowsource): ?>
                    <option value="<?php echo $rowsource['id']; ?>"><?php echo $rowsource['source_name']; ?></option>
                <?php endforeach;?>
            </select>
            
            <label><?php echo $this->lang->line('status'); ?></label>
            <select  class="form-field width10" id="select" name="status_search" title="Select a category">
                    <option value="">All</option>  
    				<?php foreach($table['status'] as $rowstatus): ?>
                    <option value="<?php echo $rowstatus['id']; ?>"><?php echo $rowstatus['status_name']; ?></option>
                <?php endforeach;?>
            </select>
            
            <input id="reset" class="button red" type="button" value="Reset" name="reset" />
			<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('search');?>" name="search" />
           
           
        </form>
    <?php echo $this->session->flashdata('message');?>
	
	<form id="form1" name="form1" method="post" action="<?php echo site_url('customersdna/crm/importform/'); ?>">
    <table class="tablebox">
	<thead class="table-header">
		<tr>
			<th>#</th>
			<th><?php echo $this->lang->line('cust_name');?></th>
            <th><?php echo $this->lang->line('tlp');?></th>
            <th><?php echo $this->lang->line('pic');?></th>
			<th><?php echo $this->lang->line('group');?></th>
			<th><?php echo $this->lang->line('sector');?></th>
			<th><?php echo $this->lang->line('source');?></th>
			<th><?php echo $this->lang->line('status');?></th>
		</tr>
	</thead>
	<tbody>
	<?php $i=1; foreach($table['customers'] as $rec): ?>
	    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
		<tr class="<?php echo $zebra;?>">

			<td><input type="checkbox"  name="id[]" value="<?php echo $rec['id'];?>" checked="checked"></td>
			<td><?php echo $rec['customer_name'];?></td>
            <td><?php echo $rec['tlp'] ?></td>
            <td><?php echo $rec['rev'] ?></td>
            <td><?php echo $rec['group_name'] ?></td>
			<td><?php echo $rec['sector_name'] ?></td>
			<td><?php echo $rec['source_name'] ?></td>
			<td><?php echo $rec['status_name'] ?></td>
		</tr>
	<?php $i++;endforeach;?>	
	</tbody>
	</table>
     <br/>
	 <p style="padding-left:10px">
	        <a class="button themed" href="javascript:select(1)">Check all</a>
			<a class="button themed" href="javascript:select(0)">Uncheck all</a>
		    <label><?php echo $this->lang->line('pic'); ?></label>
            <select  class="form-field width10" id="select" name="user" title="Select a User">
                   <option value="">Random</option>  
    				<?php foreach($table['users'] as $rowuser): ?>
                    <option value="<?php echo $rowuser['username']; ?>"><?php echo $rowuser['username']; ?></option>
                <?php endforeach;?>
            </select>
	 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('import');?>" name="search" />
     </p>      
    </form>    
	<div class="clear"></div>
	</div>
	</div>
	
	</div>
	
<script language="javascript">
function select(a) {
    var theForm = document.form1;
    for (i=0; i<theForm.elements.length; i++) {
        if (theForm.elements[i].name=='id[]')
            theForm.elements[i].checked = a;
    }
}
</script>
	
	
    
 